package laf.behaviours;

import jade.core.Agent;
import laf.agents.CognitiveAgent;
import laf.time.TimeManager;

public class CollectGroundingHistory extends TickerBehaviour {
	
	private CognitiveAgent cognitiveAgent;

	public CollectGroundingHistory(CognitiveAgent agent, long period, int priority) {
		super(agent, period, priority);
		cognitiveAgent = agent;
	}

	@Override
	protected void onTick() {
		long time = TimeManager.getInstance().getCurrentTick();
		cognitiveAgent.getGroundingHistory().add(time, cognitiveAgent.getDictionary());
		
		cognitiveAgent.getLogger().fine("Dictionary collected.");
	}

}
